#include "cachemanager.h"
#include "CacheWorker/useropeninfocache.h"
std::shared_ptr<AbstractCache> CacheManager::GetCache(myuint Type)
{
    if(Handler.count(Type))return Handler[Type];
    return  nullptr;
}

CacheManager::CacheManager(QObject *parent) : QObject(parent)
{
    Register(USER);
}

void CacheManager::Register(CacheManager::TYPE Chos)
{
    if(Handler.count(Chos))return;
    if(Chos==USER){
        Handler[Chos]=std::shared_ptr<AbstractCache>(new UserOpenInfoCache);
    }
}
